package com.helen.exam03.Entity;/*
 *@Author: helen
 *@Date:   2021/5/11 11:12
 *@Description:
 */

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

@Data
@AllArgsConstructor
@ToString
public class RegionStats implements Comparable<RegionStats>{
    private String state;
    private String country;
    private int latestLocalCases;
    private int diffFormPrevDay;

    @Override
    public int compareTo(RegionStats o) {
        if(this.latestLocalCases > o.latestLocalCases) return -1;
        else if(this.latestLocalCases < o.latestLocalCases) return 1;
        else return 0;
    }
}
